﻿using System.IO;

namespace Luna.Connectors.ZohoCRM
{
    public sealed class DownloadFile
    {
        internal DownloadFile(string P_Id, string P_ContentType, int P_ContentLength, byte[] P_Content)
        {
            Content = P_Content;
            ContentLength = P_ContentLength;
            ContentType = P_ContentType;
            ID = P_Id;
        }

        public string ID { get; private set; }

        public string ContentType { get; private set; }

        public int ContentLength { get; private set; }

        public byte[] Content { get; private set; }

        public Stream ContentStream
        {
            get { return new MemoryStream(Content, false); }
        }
    }
}